home *** CD-ROM | disk | FTP | other *** search
- From: jonas-y@isy.liu.se (Jonas Yngvesson)
- Newsgroups: comp.sources.misc
- Subject: v19i001: sipp2.0 - a library for 3D graphics, Patch01
- Message-ID: <1991Apr28.022805.7955@sparky.IMD.Sterling.COM>
- Date: 28 Apr 91 02:28:05 GMT
- Approved: kent@sparky.imd.sterling.com
- X-Checksum-Snefru: fc587531 2c43c5b6 430a67b8 f62eaf5c
-
- Submitted-by: Jonas Yngvesson <jonas-y@isy.liu.se>
- Posting-number: Volume 19, Issue 1
- Archive-name: sipp2.0/patch01
- Patch-To: sipp2.0: Volume 16, Issue 5-10
-
- This posting contains a patch file which takes sipp ver. 2.0 to ver. 2.0.1.
- It corrects all bugs in ver. 2.0 which have been reported to us so far.
-
- For those of you who don't know it, SIPP is a library for creating
- 3-dimensional scenes and rendering them using a scan-line z-buffer algorithm.
- A scene is built up of objects which can be transformed with rotation,
- translation and scaling. The objects form hierarchies where each object can
- have arbitrarily many subobjects and subsurfaces. A surface is a number of
- connected polygons which are rendered with Phong interpolation of the surface
- normals.
-
- Have fun! Jonas & Inge
- ------------------------------- CUT HERE ---------------------------------
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: Patch01
- # Wrapped by kent@sparky on Sat Apr 27 21:10:26 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive."'
- if test -f 'Patch01' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Patch01'\"
- else
- echo shar: Extracting \"'Patch01'\" \(22161 characters\)
- sed "s/^X//" >'Patch01' <<'END_OF_FILE'
- Xdiff -c -r sipp-2.0/Makefile sipp-2.0.1/Makefile
- X*** sipp-2.0/Makefile Thu Dec 20 15:54:47 1990
- X--- sipp-2.0.1/Makefile Tue Jan 15 07:12:04 1991
- X***************
- X*** 40,45 ****
- X--- 40,48 ----
- X LEX = lex
- X
- X
- X+ SHELL = /bin/sh
- X+ RM = rm -f
- X+
- X # LIBDIR is where libsipp.a will be placed when you make install.
- X # INCLUDEDIR is where the include files will be placed when you make install.
- X # MANDIR is where the manuals will be placed when you make install.
- Xdiff -c -r sipp-2.0/README sipp-2.0.1/README
- X*** sipp-2.0/README Thu Dec 20 15:00:18 1990
- X--- sipp-2.0.1/README Mon Apr 22 19:18:33 1991
- X***************
- X*** 1,5 ****
- X *******************************************************************
- X! sipp 2.0 -- 3d rendering package
- X
- X by Jonas Yngvesson jonas-y@isy.liu.se
- X Inge Wallin ingwa@isy.liu.se
- X--- 1,5 ----
- X *******************************************************************
- X! sipp 2.0.1 -- 3d rendering package
- X
- X by Jonas Yngvesson jonas-y@isy.liu.se
- X Inge Wallin ingwa@isy.liu.se
- X***************
- X*** 8,21 ****
- X Sweden
- X *******************************************************************
- X
- X! This is the beta-test release of version 2.0 of SIPP, the SImple
- X! Polygon Processor. SIPP is a library for creating 3-dimensional
- X! scenes and rendering them using a scan-line z-buffer algorithm. A
- X! scene is built up of objects which can be transformed with rotation,
- X! translation and scaling. The objects form hierarchies where each
- X! object can have arbitrarily many subobjects and subsurfaces. A
- X! surface is a number of connected polygons which are rendered with
- X! Phong interpolation of the surface normals.
- X
- X The library has an internal database for the objects that is to be
- X rendered. Objects can be installed in, and removed from, this
- X--- 8,21 ----
- X Sweden
- X *******************************************************************
- X
- X! This is SIPP, the SImple Polygon Processor, version 2.0.1. SIPP is a
- X! library for creating 3-dimensional scenes and rendering them using a
- X! scan-line z-buffer algorithm. A scene is built up of objects which
- X! can be transformed with rotation, translation and scaling. The
- X! objects form hierarchies where each object can have arbitrarily many
- X! subobjects and subsurfaces. A surface is a number of connected
- X! polygons which are rendered with Phong interpolation of the surface
- X! normals.
- X
- X The library has an internal database for the objects that is to be
- X rendered. Objects can be installed in, and removed from, this
- X***************
- X*** 31,42 ****
- X exist.
- X
- X The program has some bugs & limitations. See the BUGS entry in the
- X! manuals for more information.
- X
- X To install the library, edit the Makefile and type 'make install'. If
- X! Your system does not have the drand48() random number generator, change
- X! the macro RANDOM() in sipp.h to use the random number generator available
- X! on your system.
- X
- X If you only want to make the library but not install it, just type
- X 'make library'.
- X--- 31,43 ----
- X exist.
- X
- X The program has some bugs & limitations. See the BUGS entry in the
- X! manuals for more information. All bugs in version 2.0 which were
- X! reported to us have been fixed though.
- X
- X To install the library, edit the Makefile and type 'make install'. If
- X! Your system does not have the drand48() random number generator,
- X! change the macro RANDOM() in sipp.h to use the random number
- X! generator available on your system.
- X
- X If you only want to make the library but not install it, just type
- X 'make library'.
- X***************
- X*** 54,59 ****
- X then compile a library of object functions and let other people share
- X the benefits.
- X
- X! Linkoping 19 December 1990
- X
- X enjoy! /Jonas & Inge
- X--- 55,60 ----
- X then compile a library of object functions and let other people share
- X the benefits.
- X
- X! Linkoping 22 April 1991
- X
- X enjoy! /Jonas & Inge
- XCommon subdirectories: sipp-2.0/demo and sipp-2.0.1/demo
- XCommon subdirectories: sipp-2.0/doc and sipp-2.0.1/doc
- XCommon subdirectories: sipp-2.0/libsipp and sipp-2.0.1/libsipp
- Xdiff -c -r sipp-2.0/demo/Makefile sipp-2.0.1/demo/Makefile
- X*** sipp-2.0/demo/Makefile Thu Dec 20 15:47:17 1990
- X--- sipp-2.0.1/demo/Makefile Tue Jan 15 04:38:35 1991
- X***************
- X*** 6,11 ****
- X--- 6,13 ----
- X CC = cc
- X CFLAGS = -O -I../libsipp
- X
- X+ SHELL = /bin/sh
- X+ RM = rm -f
- X
- X SRCS = torustest.c cylindertest.c ellipsoid.c blocktest.c chain.c \
- X teapot.c structure.c planettest.c isy90.c
- Xdiff -c -r sipp-2.0/demo/blocktest.c sipp-2.0.1/demo/blocktest.c
- X*** sipp-2.0/demo/blocktest.c Wed Dec 12 14:20:48 1990
- X--- sipp-2.0.1/demo/blocktest.c Tue Jan 15 04:36:15 1991
- X***************
- X*** 43,47 ****
- X fp = fopen("block.ppm", "w");
- X render_image(side, side, fp);
- X printf("Done.\n");
- X- }
- X
- X--- 43,48 ----
- X fp = fopen("block.ppm", "w");
- X render_image(side, side, fp);
- X printf("Done.\n");
- X
- X+ exit(0);
- X+ }
- Xdiff -c -r sipp-2.0/demo/chain.c sipp-2.0.1/demo/chain.c
- X*** sipp-2.0/demo/chain.c Wed Dec 12 14:20:47 1990
- X--- sipp-2.0.1/demo/chain.c Tue Jan 15 04:36:33 1991
- X***************
- X*** 77,80 ****
- X--- 77,82 ----
- X fp = fopen("chain.ppm", "w");
- X render_image(side, side, fp);
- X printf("Done.\n");
- X+
- X+ exit(0);
- X }
- Xdiff -c -r sipp-2.0/demo/cylindertest.c sipp-2.0.1/demo/cylindertest.c
- X*** sipp-2.0/demo/cylindertest.c Wed Dec 12 14:20:51 1990
- X--- sipp-2.0.1/demo/cylindertest.c Tue Jan 15 04:36:40 1991
- X***************
- X*** 46,49 ****
- X--- 46,51 ----
- X fp = fopen("cylinder.ppm", "w");
- X render_image(side, side, fp);
- X printf("Done.\n");
- X+
- X+ exit(0);
- X }
- Xdiff -c -r sipp-2.0/demo/ellipsoid.c sipp-2.0.1/demo/ellipsoid.c
- X*** sipp-2.0/demo/ellipsoid.c Wed Dec 12 14:20:49 1990
- X--- sipp-2.0.1/demo/ellipsoid.c Tue Jan 15 04:36:57 1991
- X***************
- X*** 47,50 ****
- X--- 47,52 ----
- X fp = fopen("ellipsoid.ppm", "w");
- X render_image(side, side, fp);
- X printf("Done.\n");
- X+
- X+ exit(0);
- X }
- Xdiff -c -r sipp-2.0/demo/isy90.c sipp-2.0.1/demo/isy90.c
- X*** sipp-2.0/demo/isy90.c Wed Dec 19 11:43:12 1990
- X--- sipp-2.0.1/demo/isy90.c Tue Jan 15 04:37:07 1991
- X***************
- X*** 116,119 ****
- X--- 116,121 ----
- X view_focal(0.2);
- X image = fopen("isy90.ppm", "w");
- X render_image(siz, siz, image);
- X+
- X+ exit(0);
- X }
- Xdiff -c -r sipp-2.0/demo/planettest.c sipp-2.0.1/demo/planettest.c
- X*** sipp-2.0/demo/planettest.c Wed Dec 12 14:19:49 1990
- X--- sipp-2.0.1/demo/planettest.c Tue Jan 15 04:37:19 1991
- X***************
- X*** 41,45 ****
- X
- X outfile = fopen("planet.ppm", "w");
- X render_image(size, size, outfile);
- X- }
- X
- X--- 41,46 ----
- X
- X outfile = fopen("planet.ppm", "w");
- X render_image(size, size, outfile);
- X
- X+ exit(0);
- X+ }
- Xdiff -c -r sipp-2.0/demo/structure.c sipp-2.0.1/demo/structure.c
- X*** sipp-2.0/demo/structure.c Wed Dec 12 14:20:44 1990
- X--- sipp-2.0.1/demo/structure.c Tue Jan 15 04:37:28 1991
- X***************
- X*** 103,107 ****
- X fp = fopen("structure.ppm", "w");
- X render_image(size, size, fp);
- X printf("Done.\n");
- X- }
- X
- X--- 103,108 ----
- X fp = fopen("structure.ppm", "w");
- X render_image(size, size, fp);
- X printf("Done.\n");
- X
- X+ exit(0);
- X+ }
- Xdiff -c -r sipp-2.0/demo/teapot.c sipp-2.0.1/demo/teapot.c
- X*** sipp-2.0/demo/teapot.c Tue Dec 18 17:02:54 1990
- X--- sipp-2.0.1/demo/teapot.c Tue Jan 15 04:37:36 1991
- X***************
- X*** 67,70 ****
- X--- 67,72 ----
- X view_focal(0.25);
- X image = fopen("teapot.ppm", "w");
- X render_image(siz, siz, image);
- X+
- X+ exit(0);
- X }
- Xdiff -c -r sipp-2.0/demo/torustest.c sipp-2.0.1/demo/torustest.c
- X*** sipp-2.0/demo/torustest.c Wed Dec 12 14:20:54 1990
- X--- sipp-2.0.1/demo/torustest.c Tue Jan 15 04:37:48 1991
- X***************
- X*** 48,51 ****
- X--- 48,53 ----
- X fp = fopen("torus.ppm", "w");
- X render_image(side, side, fp);
- X printf("Done.\n");
- X+
- X+ exit(0);
- X }
- Xdiff -c -r sipp-2.0/libsipp/Makefile sipp-2.0.1/libsipp/Makefile
- X*** sipp-2.0/libsipp/Makefile Thu Dec 20 15:52:10 1990
- X--- sipp-2.0.1/libsipp/Makefile Tue Jan 15 04:40:56 1991
- X***************
- X*** 6,11 ****
- X--- 6,13 ----
- X CC = cc
- X CFLAGS = -pipe -I. -DHAVE_NO_ALLOCA
- X
- X+ SHELL = /bin/sh
- X+ RM = rm -f
- X
- X IHDRS = sipptypes.h geometric.h noise.h bezier.h
- X EHDRS = sipp.h shaders.h primitives.h
- Xdiff -c -r sipp-2.0/libsipp/TODO sipp-2.0.1/libsipp/TODO
- X*** sipp-2.0/libsipp/TODO Wed Dec 12 14:33:53 1990
- X--- sipp-2.0.1/libsipp/TODO Fri Apr 12 22:44:04 1991
- X***************
- X*** 1,17 ****
- X-
- X- Minor:
- X-
- X Make antialiasing optional with some kind of flag.
- X
- X! [Have the program whistle while it works with a verbose flag.]
- X
- X Make it possible to render into a pixmap in core.
- X
- X! Major:
- X
- X [Arbitrary number of "texture coordinates" (numbers to be
- X interpolated over polygon surfaces).]
- X
- X! [More sofisticated antialiasing (A-buffer??)]
- X
- X! [Line image (without hidden lines) for preview.]
- X--- 1,24 ----
- X Make antialiasing optional with some kind of flag.
- X
- X! More sofisticated antialiasing.
- X
- X Make it possible to render into a pixmap in core.
- X
- X! [New and better shading model (CG&A Nov 90)]
- X
- X+ [Shaped lightsources, e.g. point, spotlight]
- X+
- X+ [Colored lightsources]
- X+
- X+ [Several rendering modes, e.g. wire frame, hidden line, flat shading,
- X+ Gouraud shading]
- X+
- X [Arbitrary number of "texture coordinates" (numbers to be
- X interpolated over polygon surfaces).]
- X
- X! [Have the program whistle while it works with a verbose flag.]
- X
- X! [Shadows, see eg article in siggraph 87 about depth maps]
- X!
- X! [Curved surface rendering (not siPp any longer)]
- X!
- Xdiff -c -r sipp-2.0/libsipp/bumpy.c sipp-2.0.1/libsipp/bumpy.c
- X*** sipp-2.0/libsipp/bumpy.c Fri Apr 12 22:36:14 1991
- X--- sipp-2.0.1/libsipp/bumpy.c Wed Apr 3 20:05:27 1991
- X***************
- X*** 1,5 ****
- X /*
- X! * erode shader - simulates an eroded surface using noise
- X */
- X
- X #include <math.h>
- X--- 1,5 ----
- X /*
- X! * bumpy shader - simulates an bumpy surfaces using noise and Dnoise
- X */
- X
- X #include <math.h>
- X***************
- X*** 36,44 ****
- X tmp.z = w * bd->scale;
- X
- X if ((bd->bumpflag && bd->holeflag)
- X! || ((no = noise(tmp)) < 0.0 && bd->bumpflag)
- X || (no > 0.0 && bd->holeflag)) {
- X! tmp = Dnoise(tmp);
- X len = sqrt(nx * nx + ny * ny + nz * nz);
- X nx = nx / len + tmp.x;
- X ny = ny / len + tmp.y;
- X--- 36,44 ----
- X tmp.z = w * bd->scale;
- X
- X if ((bd->bumpflag && bd->holeflag)
- X! || ((no = noise(&tmp)) < 0.0 && bd->bumpflag)
- X || (no > 0.0 && bd->holeflag)) {
- X! tmp = Dnoise(&tmp);
- X len = sqrt(nx * nx + ny * ny + nz * nz);
- X nx = nx / len + tmp.x;
- X ny = ny / len + tmp.y;
- Xdiff -c -r sipp-2.0/libsipp/geometric.c sipp-2.0.1/libsipp/geometric.c
- X*** sipp-2.0/libsipp/geometric.c Thu Dec 20 15:10:49 1990
- X--- sipp-2.0.1/libsipp/geometric.c Mon Apr 22 18:51:11 1991
- X***************
- X*** 58,64 ****
- X /*
- X * Set MAT to the transformation matrix that represents the
- X * concatenation between the previous transformation in MAT
- X! * and a translation along the Vector VEC.
- X *
- X * [a b c 0] [ 1 0 0 0] [ a b c 0]
- X * [d e f 0] [ 0 1 0 0] [ d e f 0]
- X--- 58,64 ----
- X /*
- X * Set MAT to the transformation matrix that represents the
- X * concatenation between the previous transformation in MAT
- X! * and a translation along the vector described by DX, DY and DZ.
- X *
- X * [a b c 0] [ 1 0 0 0] [ a b c 0]
- X * [d e f 0] [ 0 1 0 0] [ d e f 0]
- X***************
- X*** 202,209 ****
- X mat_rotate_z(mat, -ang2);
- X mat_rotate_y(mat, -ang3);
- X mat_rotate_z(mat, ang);
- X- mat_rotate_z(mat, ang2);
- X mat_rotate_y(mat, ang3);
- X mat_translate(mat, point->x, point->y, point->z);
- X }
- X
- X--- 202,209 ----
- X mat_rotate_z(mat, -ang2);
- X mat_rotate_y(mat, -ang3);
- X mat_rotate_z(mat, ang);
- X mat_rotate_y(mat, ang3);
- X+ mat_rotate_z(mat, ang2);
- X mat_translate(mat, point->x, point->y, point->z);
- X }
- X
- X***************
- X*** 212,218 ****
- X /*
- X * Set MAT to the transformation matrix that represents the
- X * concatenation between the previous transformation in MAT
- X! * and a scaling with the scaling factors in the Vector scale.
- X *
- X * [a b c 0] [Sx 0 0 0] [a*Sx b*Sy c*Sz 0]
- X * [d e f 0] [ 0 Sy 0 0] [d*Sx e*Sy f*Sz 0]
- X--- 212,218 ----
- X /*
- X * Set MAT to the transformation matrix that represents the
- X * concatenation between the previous transformation in MAT
- X! * and a scaling with the scaling factors XSCALE, YSCALE and ZSCALE
- X *
- X * [a b c 0] [Sx 0 0 0] [a*Sx b*Sy c*Sz 0]
- X * [d e f 0] [ 0 Sy 0 0] [d*Sx e*Sy f*Sz 0]
- X***************
- X*** 242,248 ****
- X * Set MAT to the transformation matrix that represents the
- X * concatenation between the previous transformation in MAT
- X * and a mirroring in the plane defined by the point POINT
- X! * and the normal vector NORMAL.
- X */
- X
- X void
- X--- 242,248 ----
- X * Set MAT to the transformation matrix that represents the
- X * concatenation between the previous transformation in MAT
- X * and a mirroring in the plane defined by the point POINT
- X! * and the normal vector NORM.
- X */
- X
- X void
- XOnly in sipp-2.0.1/libsipp: patchlevel.h
- Xdiff -c -r sipp-2.0/libsipp/sipp.c sipp-2.0.1/libsipp/sipp.c
- X*** sipp-2.0/libsipp/sipp.c Thu Dec 20 15:20:25 1990
- X--- sipp-2.0.1/libsipp/sipp.c Mon Apr 22 19:17:24 1991
- X***************
- X*** 3,10 ****
- X *
- X * A general 3d graphic package
- X *
- X! * Copyright Jonas Yngvesson (jonas-y@isy.liu.se) 1988/89/90
- X! * Inge Wallin (ingwa@isy.liu.se) 1990
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X--- 3,10 ----
- X *
- X * A general 3d graphic package
- X *
- X! * Copyright Jonas Yngvesson (jonas-y@isy.liu.se) 1988/89/90/91
- X! * Inge Wallin (ingwa@isy.liu.se) 1990/91
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X***************
- X*** 19,24 ****
- X--- 19,30 ----
- X *
- X * Revision history:
- X *
- X+ * 910412 Ver. 2.0.1. Some minor bugfixes. Division by zero in
- X+ * create_edges() if an edge was horizontal in both x and y.
- X+ * Free-list became corrupted since the y_bucket was freed
- X+ * twice. Wrong parameters to (D)noise() in bumpy.c. Two lines
- X+ * interchanged in mat_rotate(). A few other minor changes.
- X+ *
- X * 901219 At last! 2.0 is out of the bag. And right in time for X-mas :-)
- X * *Major* rewrite. A new level in the object hierarchy introduced.
- X * An object is now a collection of surfaces and other objects
- X***************
- X*** 83,89 ****
- X #include <geometric.h>
- X
- X
- X! #define VERSION "2.0"
- X
- X #define ZCLIPF 100.0 /* Magic number used when defining hither & yon */
- X
- X--- 89,95 ----
- X #include <geometric.h>
- X
- X
- X! #define VERSION "2.0.1"
- X
- X #define ZCLIPF 100.0 /* Magic number used when defining hither & yon */
- X
- X***************
- X*** 92,110 ****
- X /*
- X * Global variables.
- X */
- X! static Vertex *vertex_tree; /* Vertex tree for current object. */
- X! static Vertex_ref *vertex_stack; /* Vertex stack for current polygon. */
- X! static Vertex_ref *vstack_bottom; /* Last entry in vertex stack. */
- X! static Polygon *poly_stack; /* Polygon stack for current object. */
- X! static Inst_object *object_db; /* Object database. */
- X! static Lightsource *lightsrc_stack; /* Lightsource list. */
- X! static Bucket *y_bucket; /* Y-bucket for edge lists. */
- X! static double dist_limit; /* Minimal distance between two */
- X! /* vertices without them being */
- X! /* considered to be the same vertex. */
- X! static int first_vertex; /* Used when determining if we are */
- X! /* installing the first vertex in an */
- X! /* object. *Not* a boolean! */
- X
- X /*
- X * Stack of transformation matrices used
- X--- 98,116 ----
- X /*
- X * Global variables.
- X */
- X! static Vertex *vertex_tree; /* Vertex tree for current object. */
- X! static Vertex_ref *vertex_stack; /* Vertex stack for current polygon. */
- X! static Vertex_ref *vstack_bottom; /* Last entry in vertex stack. */
- X! static Polygon *poly_stack; /* Polygon stack for current object. */
- X! static Inst_object *object_db; /* Object database. */
- X! static Lightsource *lightsrc_stack; /* Lightsource list. */
- X! static Edge **y_bucket; /* Y-bucket for edge lists. */
- X! static double dist_limit; /* Minimal distance between two */
- X! /* vertices without them being */
- X! /* considered to be the same vertex. */
- X! static int first_vertex; /* Used when determining if we are */
- X! /* installing the first vertex in an */
- X! /* object. *Not* a boolean! */
- X
- X /*
- X * Stack of transformation matrices used
- X***************
- X*** 1297,1303 ****
- X edge->wstep = wstep;
- X }
- X } else {
- X! zstep = (z2 - z1) / fabs(x2 - x1);
- X edge = (Edge *)smalloc(sizeof(Edge));
- X edge->y = y2;
- X edge->y_stop = y1;
- X--- 1303,1313 ----
- X edge->wstep = wstep;
- X }
- X } else {
- X! if (x2 != x1) {
- X! zstep = (z2 - z1) / fabs(x2 - x1);
- X! } else {
- X! zstep = z2 - z1;
- X! }
- X edge = (Edge *)smalloc(sizeof(Edge));
- X edge->y = y2;
- X edge->y_stop = y1;
- X***************
- X*** 1315,1328 ****
- X }
- X edge->polygon = polygon;
- X edge->surface = surface;
- X! edge->next = NULL;
- X! if (y_bucket[edge->y].last == NULL) {
- X! y_bucket[edge->y].first = edge;
- X! y_bucket[edge->y].last = edge;
- X! } else {
- X! y_bucket[edge->y].last->next = edge;
- X! y_bucket[edge->y].last = edge;
- X! }
- X }
- X } while (view_ref != last);
- X }
- X--- 1325,1332 ----
- X }
- X edge->polygon = polygon;
- X edge->surface = surface;
- X! edge->next = y_bucket[edge->y];
- X! y_bucket[edge->y] = edge;
- X }
- X } while (view_ref != last);
- X }
- X***************
- X*** 1605,1613 ****
- X stmp = scanline1;
- X
- X while (y >= 0) {
- X! active_list = merge_edge_lists(active_list, y_bucket[y].first);
- X next_edge = y - 1;
- X! while (next_edge >=0 && y_bucket[next_edge].first == NULL)
- X next_edge--;
- X while (y > next_edge) {
- X init_buffers(xres, z_buffer, stmp);
- X--- 1609,1617 ----
- X stmp = scanline1;
- X
- X while (y >= 0) {
- X! active_list = merge_edge_lists(active_list, y_bucket[y]);
- X next_edge = y - 1;
- X! while (next_edge >=0 && y_bucket[next_edge] == NULL)
- X next_edge--;
- X while (y > next_edge) {
- X init_buffers(xres, z_buffer, stmp);
- X***************
- X*** 1796,1820 ****
- X }
- X
- X
- X- /*
- X- * Free the memory used by an edge list.
- X- */
- X- static void
- X- delete_edges(edge_list)
- X- Edge *edge_list;
- X- {
- X- Edge *edgeref1, *edgeref2;
- X
- X- edgeref1 = edge_list;
- X- while (edgeref1 != NULL) {
- X- edgeref2 = edgeref1->next;
- X- free(edgeref1);
- X- edgeref1 = edgeref2;
- X- }
- X- }
- X-
- X-
- X-
- X /*
- X * Push the current transformation matrix on the matrix stack.
- X */
- X--- 1800,1806 ----
- X***************
- X*** 1904,1910 ****
- X
- X if (!polyref->backface) {
- X transf_vertices(polyref->vertices, surfref, loc_view_mat,
- X! &curr_mat, (double)xres, (double)yres);
- X }
- X
- X }
- X--- 1890,1897 ----
- X
- X if (!polyref->backface) {
- X transf_vertices(polyref->vertices, surfref, loc_view_mat,
- X! &curr_mat, (double)(xres >> 1),
- X! (double)(yres >> 1));
- X }
- X
- X }
- X***************
- X*** 1951,1970 ****
- X double matrix[4][4];
- X int i;
- X
- X! y_bucket = (Bucket *)calloc(yres << 1, sizeof(Bucket));
- X
- X get_view_transf(matrix);
- X MatCopy(&curr_mat, &ident_matrix);
- X
- X! traverse_object_db(object_db, matrix, xres, yres);
- X
- X vecnorm(&camera.vec);
- X scan_and_render(xres << 1, yres << 1, image_file);
- X view_vec_eval();
- X-
- X- for (i = 0; i < (yres << 1); i++)
- X- delete_edges(y_bucket[i].first);
- X- free(y_bucket);
- X }
- X
- X
- X--- 1938,1953 ----
- X double matrix[4][4];
- X int i;
- X
- X! y_bucket = (Edge **)calloc(yres << 1, sizeof(Edge *));
- X
- X get_view_transf(matrix);
- X MatCopy(&curr_mat, &ident_matrix);
- X
- X! traverse_object_db(object_db, matrix, xres << 1, yres << 1);
- X
- X vecnorm(&camera.vec);
- X scan_and_render(xres << 1, yres << 1, image_file);
- X view_vec_eval();
- X }
- X
- X
- Xdiff -c -r sipp-2.0/libsipp/sipptypes.h sipp-2.0.1/libsipp/sipptypes.h
- X*** sipp-2.0/libsipp/sipptypes.h Sat Nov 17 01:43:53 1990
- X--- sipp-2.0.1/libsipp/sipptypes.h Thu Mar 21 20:55:12 1991
- X***************
- X*** 41,54 ****
- X
- X
- X /*
- X- * Y-bucket to keep the edge lists
- X- */
- X- typedef struct {
- X- Edge *first, *last; /* Firs and last entry in the list */
- X- } Bucket;
- X-
- X-
- X- /*
- X * Objects installed in the database for rendering are kept
- X * in a binary tree, internal to sipp. This database will
- X * automatically contain all top level objects, but the user
- X--- 41,46 ----
- X--
- END_OF_FILE
- if test 22161 -ne `wc -c <'Patch01'`; then
- echo shar: \"'Patch01'\" unpacked with wrong size!
- fi
- # end of 'Patch01'
- fi
- echo shar: End of archive.
- exit 0
- ------------------------------------------------------------------------------
- J o n a s Y n g v e s s o n
- Dept. of Electrical Engineering jonas-y@isy.liu.se
- University of Linkoping, Sweden ...!uunet!isy.liu.se!jonas-y
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-